﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;

namespace JiaBloggingSite.Core.Objects
{
    public class Comment
    {
        [Required(ErrorMessage = "Id: Field is required")]
        public virtual int Id
        { get; set; }

        [Required(ErrorMessage = "Content: Field is required")]
        public virtual string Content
        { get; set; }

        [Required(ErrorMessage = "PostedOn: Field is required")]
        public virtual DateTime PostedOn
        { get; set; }

        public virtual Post Post
        { get; set; }

        public virtual string UserName
        { get; set; }

        public virtual List<Comment> ChildComments
        { get; set; }
    }
}
